<?php
class ModelToolYjfLog extends Model {
    public function updateReturnData($PK, $data, $table) {
        $sql = "UPDATE `".$table."` SET ";
        foreach ($data as $col=>$val) {
            $sql .= "`".$col."`='".$val."',";
        }
        $sql = substr($sql, 0, -1)." WHERE `".$table."_id`='".$PK."'";
        $this->db->query($sql);
    }
}
